#ifndef TEXTMININGCOMPILER_HH_
#define TEXTMININGCOMPILER_HH_

///
/// \file TextMiningCompiler.hh
/// \brief Functions to compile a dictionary into a space optimized Trie quickly unserialized
/// \author Coddy Levi, Sylvain Lobry
/// \version 1.0
///

#include "Trie.hh"
#include "optimized_trie.hh"

///
/// \fn const Trie build_trie(const char* path)
/// \brief Reads a dictionary in a given file and builds a dynamically stored Trie from it
///
/// \param[in]		path Path to the dictionary file
/// \return		The resulting Trie
//
const Trie build_trie(const char* path);

///
/// \fn OptimizedTrie* build_optimized_trie(const Trie& trie, unsigned &out_size);
/// \brief Translate a dynamically stored Trie into a space optimized quickly unserialized one
///
/// \param[in]		trie Dynamic trie structure
/// \param[out]		out_size size of the newly created structure
/// \return		The resulting optimized Trie
//
OptimizedTrie* build_optimized_trie(const Trie& trie,
				    unsigned &out_size);

#endif
